package com.gsm.bean;

import com.gsm.entity.Person;
import com.gsm.log.MyLogger;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

@Component
public class MyFactoryBean implements FactoryBean<Person> {

	@Override
	public Person getObject() throws Exception {
		MyLogger.log("Created Person Object!");
		return new Person(18, "gaosm", 1);

	}

	@Override
	public Class<?> getObjectType() {
		return Person.class;
	}

	@Override
	public boolean isSingleton() {
		return FactoryBean.super.isSingleton();
	}
}
